{% extends 'base/base1.html' %}

{% block title %}删除订单{% endblock %}

{% block main %}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <h4>确认删除订单</h4>
                </div>
                <div class="card-body">
                    <p>确定要删除以下订单吗？</p>
                    <div class="alert alert-info">
                        <strong>订单号：</strong>{{ object.order_number }}<br>
                        <strong>用户：</strong>{{ object.user.username }}<br>
                        <strong>商品：</strong>{{ object.product.name }}<br>
                        <strong>金额：</strong>￥{{ object.total_amount }} (￥{{ object.price }} x {{ object.quantity }})<br>
                        <strong>状态：</strong>{{ object.get_status_display }}
                    </div>
                    <p class="text-danger">此操作不可撤销！</p>
                    <form method="post">
                        {% csrf_token %}
                        <button type="submit" class="btn btn-danger">确认删除</button>
                        <a href="{% url 'main:order_list' %}" class="btn btn-secondary">取消</a>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}